package com.yk.ykmessagesdk.bean;

import android.text.TextUtils;


import com.yk.ykmessagesdk.R;
import com.yk.ykmessagesdk.utils.ApplicationUtils;

import java.io.Serializable;

public class PayBean implements Serializable {
    public int amount;
    public String merid = "";
    public String goodsid = "";
    public String goodsName = "";
    public String amttype = "";
    public boolean isShowConfirmActivity = false;

    public class CheckParamsResult {

        /* renamed from: ok */
        public boolean isOk = false;
        public String msg = "";

        public CheckParamsResult() {
        }
    }

    public CheckParamsResult checkParams() {
        CheckParamsResult checkParamsResult = new CheckParamsResult();
        if (TextUtils.isEmpty(this.merid)) {
            checkParamsResult.isOk = false;
            checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_merId_can_not_be_empty);
            return checkParamsResult;
        }
        if (TextUtils.isEmpty(this.goodsid)) {
            checkParamsResult.isOk = false;
            checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_goodsId_can_not_be_empty);
            return checkParamsResult;
        }
        if (TextUtils.isEmpty(this.goodsName)) {
            checkParamsResult.isOk = false;
            checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_goodsName_can_not_be_empty);
            return checkParamsResult;
        }
        if (this.amount <= 0) {
            checkParamsResult.isOk = false;
            checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_amount_must_be_greater_than_0);
            return checkParamsResult;
        }
        if (TextUtils.isEmpty(this.amttype)) {
            checkParamsResult.isOk = false;
            checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_unit_can_not_be_empty);
            return checkParamsResult;
        }
        checkParamsResult.isOk = true;
        checkParamsResult.msg = ApplicationUtils.getApplication().getString(R.string.dream_pay_sdk_all_params_ok);
        return checkParamsResult;
    }

}
